package com.linchong.xshop.service;

import com.linchong.xshop.dto.ImageHolder;
import com.linchong.xshop.dto.ShopExecution;
import com.linchong.xshop.entity.Shop;
import com.linchong.xshop.exceptions.ShopOperationException;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import java.io.File;
import java.io.InputStream;


/**
 * @author linchong
 * @desc 店铺接口
 * @email littlexbear@163.com
 * @create 2018-07-15 8:45
 * @CopyRight(C) https://blog.csdn.net/littlexbear
 **/
public interface ShopService {

    /**
     * 根据shopCondition分页返回相应的店铺列表
     * @param shopCondition
     * @param pageIndex
     * @param pageSize
     * @return
     */
    public ShopExecution getShopList(Shop shopCondition,int pageIndex,int pageSize);

    /**
     * 根据店铺Id获取店铺的信息
     * @param shopId
     * @return
     */
    Shop getByShopId(long shopId);

    /**
     * 更新店铺信息以及处理店铺图片
     * @param shop
     * @param shopImgInputStream
     * @param fileName
     * @return
     */
    ShopExecution modifyShop(Shop shop, ImageHolder thumbnail) throws ShopOperationException;
    /**
     * 添加店铺
     * @param shop
     * @param shopImgInputStream
     * @return
     */
    ShopExecution addShop(Shop shop,  ImageHolder thumbnail);
}
